package com.Pure;

import android.graphics.*;

public class PureMath extends Object {
	
	public static float calLightReflection(float inAngle,float mirrorAngle)
	{
		float outAngle = 0;
		return outAngle;
	}

	//calculate grid index for gameObjects according to its positions 
	public static Point calSnaping(Point objectPos,Point gridPosition, int gridSize)
	{
		Point p = new Point();
		
		 p.x = (objectPos.x - gridPosition.x) / gridSize;
		 p.y = (objectPos.y - gridPosition.y) / gridSize; // map offset
		
		 return p;
		
	}
	public static double getDistance(Point a,Point b)
	{
		return Math.sqrt( Math.pow((a.x - b.x), 2) +  Math.pow((a.y - b.y), 2));
	}
}
